package com.server.service.impl;


import com.pojo.entity.Comment;
import com.pojo.vo.CommentVO;
import com.server.mapper.CommentMapper;
import com.server.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImpl implements CommentService {
    @Autowired
    CommentMapper commentMapper;
    @Override
    public List<CommentVO> getCommentList(Integer articleId) {
        return commentMapper.getCommentList(articleId);
    }

    @Override
    public Integer insertComment(Comment comment) {
        return commentMapper.addComment(comment);
    }

    @Override
    public Integer getCommentCount(Integer articleId) {
        return commentMapper.getCommentCount(articleId);
    }
}
